<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script>
	window.onload = function()
	{
		 var oTxt1= document.getElementById('txt1');
			var oTxt2= document.getElementById('txt2');
			var oBtn= document.getElementById('btn1');
		
			oBtn.onclick = function()
			{
					oTxt2.value+= oTxt1.value +'\n';
					
					oTxt1.value ='';
			};
	}
	</script>
</head>

<body>
<input type="text" id="txt1">
<input type="button" id="btn1" value="提交"><br>
<textarea name="" id="txt2" cols="30" rows="10"></textarea>
</body>
</html>
